<!DOCTYPE html>
<html>
<head>
    <title>商铺信息修改</title>
<#include "../common/common.ftl"/>
</head>
<body>
<div class="layui-fluid">
    <form class="layui-form" id="shopHouseForm">
        <input type="hidden" name="shopHouseId" value="${(shopHouse.id)!}"/>
        <input type="hidden" name="azProjectId" value="${(azProject.id)!}"/>
        <div class="layui-card">
            <div class="layui-card-header">一、商铺基本信息</div>
            <div class="layui-card-body">

                <div class="layui-form-item">
                    <label class="layui-form-label">项目名称：</label>
                    <div class="layui-form-mid">${(azProject.projectName)!}</div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">幢号：</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" autocomplete="off"
                               name="buildNum" value="${(shopHouse.buildNum)!}" lay-verify="required"/>
                    </div>
                </div>


                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">户号：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" autocomplete="off"
                                   name="houseNum" value="${(shopHouse.houseNum)!}" lay-verify="required"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">所在层数：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" autocomplete="off"
                                   name="floor" value="${(shopHouse.floor)!}" lay-verify="intergerRequired"/>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">层次别名：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" autocomplete="off"
                                   name="floorStr" value="${(shopHouse.floorStr)!}" lay-verify="required"/>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">建筑面积：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" autocomplete="off"
                                   name="buildArea" value="${(shopHouse.buildArea)!}" lay-verify="bigRequired"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">其中公摊面积：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" autocomplete="off"
                                   name="poolArea" value="${(shopHouse.poolArea)!}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">一层产权面积：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" autocomplete="off"
                                   name="oneFloorArea" value="${(shopHouse.oneFloorArea)!}"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">二层产权面积：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" autocomplete="off"
                                   name="twoFloorArea" value="${(shopHouse.twoFloorArea)!}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">所需置换比例：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input"
                                   name="zhBl" value="${(shopHouse.zhBl)!}" lay-verify="bigRequired"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">所需置换面积：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" autocomplete="off"
                                   name="sxZhArea" value="${(shopHouse.sxZhArea)!}"/>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">14米以内面积：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" autocomplete="off"
                                   name="tenFourAreaN" value="${(shopHouse.tenFourAreaN)!}" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">14米以外面积：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" autocomplete="off"
                                   name="tenFourAreaW" value="${(shopHouse.tenFourAreaW)!}" />
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">公维金单价：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input"
                                   name="gwjPrice" value="${(shopHouse.gwjPrice)!}" lay-verify="bigRequired"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">房屋用途：</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" autocomplete="off"
                                   name="houseYc" value="${(shopHouse.houseYc)!}" />
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">沿街名称：</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" autocomplete="off"
                               name="yjName" value="${(shopHouse.yjName)!}" lay-verify="required"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">房源状态：</label>
                    <div class="layui-input-block" id="houseStatus">
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-card">
            <div class="layui-card-header">二、其他信息</div>
            <div class="layui-card-body">

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">备注：</label>
                    <div class="layui-input-block">
                        <textarea class="layui-textarea" cols="150" rows="5"
                                  name="memo">${(shopHouse.memo)!}</textarea>
                    </div>
                </div>

            </div>
        </div>

        <button style="display: none;" class="layui-btn" id="submitBtn" name="submitBtn" lay-submit=""
                lay-filter="submit">立即提交
        </button>
    </form>
</div>
<script src="/layui/layui.js" charset="utf-8"></script>
<script>
    layui.config({
        base: '/modules/' //静态资源所在路径
    }).use(['form', 'jmdf', 'dataDict', 'element', 'verify'], function () {
        var form = layui.form, $ = layui.jquery, dataDict = layui.dataDict, jmdf = layui.jmdf,
                verify = layui.verify, parentIndex = parent.layer.getFrameIndex(window.name);

        dataDict.dataDictRadio("房源状态", "houseStatus", "${(shopHouse.houseStatus)!"1"}");

        //监听提交
        form.on('submit(submit)', function (data) {
            $.ajax({
                url: 'shopHouseSave',
                type: 'post',
                data: $("#shopHouseForm").serialize(),//当前容器的全部表单字段，名值对形式：{name: value}
                async: false,
                success: function (data) {
                    if (data.code == "0001") {
                        layer.alert(data.message);
                        parent.loadData();
                        parent.layer.close(parentIndex);
                    } else {
                        layer.msg(data.message, {anim: 6, icon: 2, time: 3000});
                    }
                }
            });
            return false;
        });
    });
</script>
</body>
</html>